//
//  Jacobian.hpp
//  EMT_C
//
//  Created by Duong Ngo on 8/27/16.
//  Copyright © 2016 Duong Ngo. All rights reserved.
//

#ifndef Jacobian_hpp
#define Jacobian_hpp

#include <stdio.h>
#include <map>

#include "IpTNLP.hpp"
#include "global.hpp"

using namespace Ipopt;

void find_jacobian_structure_for_time_t (const int& t, Index* iRow, Index* jCol, int& dem);

void find_jacobian_values_for_time_t (const int& t, const std::vector<double>& ss, const Number* x, Number* values, int& dem);

void find_jac_struct_for_initial_condition (Index* iRow, Index* jCol, int& dem);

void find_jac_values_for_initial_condition (const Number* x, Number* values, int& dem);

void find_jac_struct_for_terminal_condition (Index* iRow, Index* jCol, int& dem);

void find_jac_values_for_terminal_condition ( const Number* x, Number* values, int& dem);

void summarize_jac_struct (Index* iRow, Index* jCol, int& dem);

void summarize_jac_values (const std::vector<double>& ss, const Number* x, Number* values, int& dem);

#endif /* Jacobian_hpp */
